#include "utils.h"

string its(int i)
{
    char buf[10];
    sprintf(buf, "%d", i);
    return buf;
}

string itsf(int i, int spc)
{
    char buf[10];
    sprintf(buf, "%*d", spc, i);
    return buf;
}


//template<class T> int size(const T& u) { return u.size(); }

int size(vector<string>S)
{
    return S.size();
}

const char *PrintLog1(int i)
{

    return Log1.at(i).c_str();
}

void col(int win_name /* = 0 */, int x)
{
    if (x < 8) wattrset(win[win_name], COLOR_PAIR(x));
    else if (x == 8) wattrset(win[win_name], COLOR_PAIR(8) | A_BOLD);
    else wattrset(win[win_name], COLOR_PAIR(x - 8) | A_BOLD);
}


void AddBLog(string s)
{
    Log1.push_back(s);
}